package com.byq.mm.smartlib.cluster.server;

import android.content.Context;
import android.media.MediaPlayer;

import com.byq.mm.abstractx.engine.CoreEnvironment;
import com.byq.mm.application.cluster.server.executor.OnoffExecutor;

public class AndroidFlashExecutor extends AndroidExecutor implements
		OnoffExecutor {
	
	public AndroidFlashExecutor(String deviceId, String cluster,
								CoreEnvironment env, Context ctx) {
		super(deviceId, cluster, env, ctx);
		
	}

	@Override
	public void off() {
		
		
	}

	@Override
	public void on() {
		
		
	}
	boolean on = false;
	MediaPlayer mp;
	@Override
	public void toggle() {
//		if(mp == null){
//			mp = MediaPlayer.create(ctx, R.raw.snow);
//			try {
//				mp.prepare();
//			} catch (IllegalStateException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//			} catch (IOException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//			}
//			mp.start();
//			return;
//		}
//		if(mp.isPlaying())
//			mp.pause();
//		else
//			mp.start();

		
	}

	

}
